


<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>注册</title>
		<script src="bower_components/jquery/dist/jquery.min.js"></script>
		<script src="js/jq.cookie.js"></script>
		<link rel="stylesheet" href="bower_components/layer/layer.css" />
		<script type="text/javascript" src="bower_components/layer/layer.js" ></script>
		<!--<script type="text/javascript" src="js/layui.js" ></script>-->


	</head>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		body{
			background:#3c8dbc;
	
		}
		@keyframes flash{
		0%{
				transform: rotate(0deg);
    			-webkit-transform: rotate(0deg);
				}
			30%{
				transform: rotate(120deg);
    			-webkit-transform: rotate(120deg);
				}
			60%{
				transform: rotate(240deg);
    			-webkit-transform: rotate(240deg);
				}
			100%{
				transform: rotate(360deg);
    			-webkit-transform: rotate(360deg);
				}
		}
		
	   .dw_logo{
	   	text-align: center;
	   	margin:100px auto;
	   	margin-bottom: 0;
	   }
	   .dw_logo h1{
	   	margin: 0;
	   	color: white;
	   }
		#dw_form{
		width: 100%;
		text-align: center;
		display: inline-block;
		}
	   .login_box{
			display: inline-block;
			width: 350px;
			height: 345px;
			
			margin-top: 20px;
			border: solid 1px #ECF0F5 ;
			border-radius: 15px 15px ;
		}
		.login_box2{
			display: inline-block;
			width: 330px;
			margin-top:10px;
			height: 320px;
			background: rgba(255,255,255,0.5);
			border: dashed 1px #ecf0f5 ;
			border-radius: 15px 15px ;
			position: relative;
		}
		#dw_form div input{
			width: 280px;			
			height: 35px;
			border: none;
			margin-top: 20px;
			text-indent: 2em;
		} 
		#login{
			background: none;
			width:60px;
			height: 30px;
			position: absolute;
			bottom: 30px;
			left: 30px;
			border: none;
			background: #3c8dbc;
			color: white;
			cursor: pointer;
		}
		#sign{
			background: none;
			width:60px;
			height: 30px;
			position: absolute;
			bottom: 30px;
			right: 30px;
			border: none;
			background: #3c8dbc;
			color: white;
			cursor: pointer;
		}
		#dw_form a{
			position: absolute;
			right: 0;
			bottom:-40px;
			text-decoration: none;
			color: rgb(115,115,115);
			font-size: 14px;
		}
		footer{
			width: 100%;
			text-align: center;
			font-size: 16px;
			margin-top: 100px;	
			}
		p{
			color: rgb(122,122,122);
			font-weight: 400;
		}
		footer input{
			color:rgb(140,18,68);
			text-decoration: none;
			background: none;
			border: none;
		}
		.pop{
			 background: -webkit-linear-gradient(#3c8dbc, white); /* Safari 5.1 - 6.0 */
			  background: -o-linear-gradient(#3c8dbc, white); /* Opera 11.1 - 12.0 */
			  background: -moz-linear-gradient(#3c8dbc, white); /* Firefox 3.6 - 15 */
			  background: linear-gradient(#3c8dbc, white);
			  width: 200px;
			  height: 200px;
			  
			  border-radius: 50% 50%;
			  opacity: 0.8;
			  position: absolute;
			  left: 20px;
			  bottom: 50px;
			  animation: 20s flash;
			  box-shadow: inset -30px -30px 75px rgba(0, 0, 0, .2),
    
					    inset 0px 0px 5px rgba(0, 0, 0, .5),
					   
					    inset 0px 0px 5px rgba(255, 255, 255, .5),
					   
					    inset -3px -3px 5px rgba(0, 0, 0, .5),
					    
					    0 0 50px rgba(255, 255, 255, .75);
		}
		.pop:after {
			    /* 使用:after伪元素构造泡沫内壁，形成薄薄的泡沫膜 */
			     
			    content: "";
			    display: block;
			    position: absolute;
			    width: 190px;
			    height: 190px;
			    border-radius: 190px;
			    left: 5px;
			    top: 5px;
			    box-shadow: inset 0px -5px 5px rgba(0, 0, 0, .05);
			}
			.pop:before {
			     
			    content: "Duowei";
			    display: block;
			    position: absolute;
			    width: 50px;
			    height: 50px;
			    color: white;
			    top: 25px;
			    left: 25px;
			    border-radius: 75px 25px;
			    box-shadow: inset 10px 10px 50px rgba(255, 255, 255, .6);
			}
body .demo-class .layui-layer-title{background:#eea2bb; color:#fff; border: none;}
body .demo-class .layui-layer-btn{border-color:1px solid #eea2bb}
body .demo-class .layui-layer-btn a{background:white;}
body .demo-class .layui-layer-btn .layui-layer-btn0{background:#eea2bb;border:none;}
body .demo-class .layui-layer-btn .layui-layer-btn1{background:#ffffff;}
	</style>
	<body>
		<div class="dw_logo">
			<h1>Duowei CRM</h1>
		</div>
		
		<form id="dw_form">
			<div class="login_box">
				<div class="login_box2">
					<div>
					   <input class="user_name" type="text" placeholder="姓名" />
				   </div>
				    <div>
					<input class="pass_name" type="text" placeholder="电话"/>
				    </div>
				     <div>
					   <input class="user_name" type="text" placeholder="部门" />
				   </div>
				    <div>
					<input class="pass_name" type="password" placeholder="密码"/>
				    </div>
				     <button id="sign" type="button" value="" />提交</button>
				</div>
				
			</div>
			
			
		</form>
		<div class="pop pop1"></div>
		<div class="pop pop2"></div>
		<div class="pop pop3"></div>
		<div class="pop pop4"></div>
		<div class="pop pop5"></div>
	</body>
</html>
	
<script>

	/*
	$(".login_sign").click(function(){
			layer.open({
				type: 2
				,title: false
				,closeBtn: 0
				,area:['450px','400px']
				,shade: 0.8
				,id: 'LAY_layuipro' 			       
				,btnAlign: 'c'
				,moveType: 1 
				,content:'http://www.duoweish.com/crm/sign_in.html'
				,success: function(){
					
				 }
				})
	})*/
	$("#sign").click(function(){
			if($(".login_box2").find("input").eq(0).val()==''){
				layer.msg('用户名不能为空'); 
			}else if($(".login_box2").find("input").eq(1).val()==''){
				layer.msg('电话不能为空'); 
			}else if($(".login_box2").find("input").eq(2).val()==''){
				layer.msg('部门不能为空'); 
			}else if($(".login_box2").find("input").eq(3).val()==''){
				layer.msg('密码不能为空'); 
			}else{
				$.ajax({
					type:"get",
					url:"http://www.duoweish.com/apis/Register/",
//					async:true,
					data:{
						UserName:$(".login_box2").find("input").eq(0).val(),
						Phone: $(".login_box2").find("input").eq(1).val(),
						Department:$(".login_box2").find("input").eq(2).val(),
						Password:$(".login_box2").find("input").eq(3).val()
					},
					success:function(data){
						if(data == "failure"){
							layer.msg('该账号已存在，请重试');
						}else{
							parent.layer.msg('注册成功',{time:100},function(){
								window.location.href="http://www.duoweish.com/crm/login.html";	
							});
										
						}

					}
				});
			}
		});
</script>	
